package com.nf.action;

import com.nf.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

//SpringMVC 的C
@Controller
public class Test {

    @Autowired
    private TestService testService;

    @RequestMapping("/abc")
    public String xxx(Model model){//SpringMVC 的M
        //SpringMVC 的V
//model.addAttribute("kkk","88美元");写死
        model.addAttribute("kkk",testService.getString());
        return "Show";
    }
}
